package com.seven.bus.mapper;

import com.seven.bus.entity.BusLine;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.seven.bus.entity.BusLineVO;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author seven
 * @since 2021-01-12
 */
public interface BusLineMapper extends BaseMapper<BusLine> {

    @Select("select tb1.*,tb2.station from bus_line tb1,bus_station tb2 where tb1.bus_station_id=tb2.id and tb1.bus_info_id=#{busInfoId} ORDER BY tb1.sort ASC")
    BusLineVO getLineByBusInfoId(String busInfoId);
}
